home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 2 / 64er_Magazin_Sonderheft_02_86-02_1986_Markt__Technik_de.d64 / spline 64 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  11KB  |  520 lines

  1. 10 rem **********************
  2. 20 rem *       spD       *
  3. 30 rem *                    *
  4. 40 rem *         by         *
  5. 50 rem *                    *
  6. 60 rem *       m.buhtz      *
  7. 70 rem *                    *
  8. 80 rem *  tel.: 0281/22431  *
  9. 90 rem **********************
  10. 100 run110
  11. 110 rem  *** natuerliche spDfunktion ***
  12. 120 :
  13. 130 rem eingabemenue
  14. 140 :
  15. 150 print"[147]              eingabemenue              [146]"
  16. 160 print:print:print:printspc(15)"key     (1)"
  17. 170 print:print:printspc(15)"tape     "
  18. 180 print:printspc(15)"graphic (2)"
  19. 190 printspc(15)"d-file  (3)"
  20. 200 print:print:printspc(15)"disk     "
  21. 210 print:printspc(15)"graphic (4)"
  22. 220 printspc(15)"d-file  (5)"
  23. 230 print:print:printspc(15)"fkt-spl (6)"
  24. 240 geta$:a=val(a$):on a goto 380,3560,4550,3570,4560,4930:goto240
  25. 250 :
  26. 260 rem ausgabemenue
  27. 270 :
  28. 280 print"[147]            ausgabemenue                [146]"
  29. 290 print:print:printspc(12)"new      (1)"
  30. 300 print:print:print:printspc(12)"tab      (2)"
  31. 310 print:printspc(14)"copy   (3)"
  32. 320 print:print:print:printspc(12)"graph    (4)"
  33. 330 print:printspc(14)"old    (5)"
  34. 340 print:printspc(14)"copy   (6)"
  35. 350 print:printspc(14)"tape   (7)"
  36. 360 print:printspc(14)"disk   (8)"
  37. 370 geta$:a=val(a$):on a goto  100,930,3380,1230,2570,2540,3890,3900:goto370
  38. 380 :
  39. 390 rem eingabe key
  40. 400 :
  41. 410 print"[147]            eingabe key                 [146]"
  42. 420 print:print:input"  anzahl der kurven";ak$
  43. 430 ifak$="_"then150
  44. 440 ak=val(ak$)
  45. 450 ifak=0then420
  46. 460 print:print:input"  anzahl der int.pol.schritte";sw$
  47. 470 ifsw$="_"then420
  48. 480 sw=val(sw$)
  49. 490 ifsw=0then460
  50. 500 print:print
  51. 510 fori=1toak
  52. 520 print:print"  kurve"i"[146]"
  53. 530 print:print:input"  anzahl der stuetzstellen";n1$(i)
  54. 540 ifn1$(i)="_"then460
  55. 550 n1(i)=val(n1$(i))
  56. 560 ifn1(i)>=3then590
  57. 570 print:print:print"  fehler!"
  58. 580 print:print"  minimale anzahl stuetzstellen =3!":goto530
  59. 590 ifn1(i)>n1thenn1=n1(i)
  60. 600 nexti
  61. 610 print:print:print"  eingabe o.k. ?  (j/n)"
  62. 620 geta$
  63. 630 ifa$="n"then410
  64. 640 ifa$="j"then660
  65. 650 goto620
  66. 660 n1=n1+1
  67. 670 dimx(ak,n1),y(ak,n1),sw(ak,n1)
  68. 680 dima(n1),c(n1),b(n1),d(n1),h(n1),m(n1,n1),v(n1),o(n1),p(n1),q(n1)
  69. 690 fori=1toak
  70. 700 print"[147]         eingabe stuetzstellen          [146]"
  71. 710 print:print:print"  kurve"i"[146]"
  72. 720 forj=1ton1(i)
  73. 730 ifj<=0then690
  74. 740 print"  x("j"), y("j")"
  75. 750 input"  ";x$(i,j),y(i,j)
  76. 760 ifx$(i,j)="_"thenj=j-2:nextj
  77. 770 x(i,j)=val(x$(i,j))
  78. 780 de=sw*(n1(i)-1)+n1(i)
  79. 790 ifde>dithendi=de
  80. 800 nextj
  81. 810 gosub4160
  82. 820 forj=2ton1(i)
  83. 830 sw(i,j-1)=(x(i,j)-x(i,j-1))/sw
  84. 840 nextj
  85. 850 print:print:print"  abspeichern ?  (j/n)"
  86. 860 geta$:ifa$="n"then890
  87. 870 ifa$="j"then4320
  88. 880 goto860
  89. 890 nexti
  90. 900 dimz(di+3),t(di+3)
  91. 910 goto260
  92. 920 :
  93. 930 rem tabelle
  94. 940 :
  95. 950 :
  96. 960 fork=1toak:g=0:n=n1(k):e6=1
  97. 970 gosub4100:gosub2610:j=0
  98. 980 print"[147]                kurve"k"[157]                 [146]"
  99. 990 forl=1ton1(k):print
  100. 1000 a1=int(a(l)*100+.5)/100:b1=int(b(l)*100+.5)/100:c1=int(c(l)*100+.5)/100
  101. 1010 d1=int(d(l)*100+.5)/100
  102. 1020 print"spl[157]"l"[157]: y="a1"[146][157]+"b1"[146][157]*x+"c1"[146][157]*x^2+"d1"[146][157]*x^3"
  103. 1030 nextl
  104. 1040 ifpeek(203)<>60then1040
  105. 1050 print"[147] kurve"k"[157]      x             y           [146]"
  106. 1060 fori=1to21
  107. 1070 ifi+j>gthen1160
  108. 1080 za=abs(z(i+j)):tc=abs(t(i+j))
  109. 1090 ifza<1thenza=0.1
  110. 1100 iftc<1thentc=0.1
  111. 1110 ta=int(log(za)/log(10))+1:tb=int(log(tc)/log(10))+1
  112. 1120 printtab(13-ta)z(i+j),tab(28-tb)t(i+j)
  113. 1130 nexti
  114. 1140 ifpeek(203)<>60then1140
  115. 1150 j=j+21:goto1050
  116. 1160 ifpeek(203)<>60then1160
  117. 1170 ife5= 2then1190
  118. 1180 nextk
  119. 1190 j=0:i=0:ife5=1then5120
  120. 1200 ife5=2thene5=1:e6=0
  121. 1210 goto260
  122. 1220 :
  123. 1230 rem graphic
  124. 1240 :
  125. 1250 ifd<>0thentx=nx:ty=ny:gosub4100:goto1920
  126. 1260 e2=0:e3=0
  127. 1270 print"[147]     achseneinteilung und einheiten     [146]"
  128. 1280 print:print:input"       einheit x-achse";t1$
  129. 1290 ift1$="_"then280
  130. 1300 print:print:input"       einheit y-achse";t2$
  131. 1310 ift2$="_"then1270
  132. 1320 print:print:print:printspc(12)" einteilung [146]"
  133. 1330 print:print:print:printspc(14)"manu  (1)"
  134. 1340 print:print:print:printspc(14)"auto  (2)"
  135. 1350 geta$:ifa$="_"then1270
  136. 1360 a=val(a$):ifa=2thene1=1:goto1840
  137. 1370 ifa=1thene1=0:goto1390
  138. 1380 goto1350
  139. 1390 print:print:print"[147]             x-achse [146]"
  140. 1400 print:print:printspc(12)"linear    (1)"
  141. 1410 print:printspc(12)"logarith. (2)"
  142. 1420 geta$:ifa$="_"then1320
  143. 1430 a=val(a$):onagoto1440,1560:goto1420
  144. 1440 input"      maximalwert";mx$
  145. 1450 ifmx$="_"then1390
  146. 1460 mx=val(mx$)
  147. 1470 input"      minimalwert";nx$
  148. 1480 ifnx$="_"then1670
  149. 1490 nx=val(nx$)
  150. 1500 ifnx>mxthenprint:print:print"       fehler !":goto1440
  151. 1510 v=296/(mx-nx):tx=nx
  152. 1520 input"      stufung";sx$
  153. 1530 ifsx$="_"then1470
  154. 1540 sx=val(sx$)
  155. 1550 goto1610
  156. 1560 input"      maximalwert";mx$
  157. 1570 ifmx$="_"then1390
  158. 1580 mx=val(mx$)
  159. 1590 mx=log(mx)/log(10):sx=1:nx=0:tx=0:v=296/mx
  160. 1600 e2=1
  161. 1610 print:print:print"[147]             y-achse "
  162. 1620 print:print:printspc(12)"linear     (1)"
  163. 1630 print:printspc(12)"logarith.  (2)"
  164. 1640 geta$:a=val(a$):onagoto1670,1790:goto1640
  165. 1650 geta$:ifa$="_"then1390
  166. 1660 a=val(a$):onagoto1670,1790:goto1640
  167. 1670 input"      maximalwert";my$
  168. 1680 ifmy$="_"then1610
  169. 1690 my=val(my$)
  170. 1700 input"      minimalwert";ny$
  171. 1710 ifny$="_"then1670
  172. 1720 ny=val(ny$)
  173. 1730 ifny>=mythenprint:print:print"       fehler !":goto1670
  174. 1740 w=176/(my-ny):ty=ny
  175. 1750 input"      stufung";sy$
  176. 1760 ifsy$="_"then1700
  177. 1770 sy=val(sy$)
  178. 1780 goto1840
  179. 1790 input"       maximalwert";my$
  180. 1800 ifmy$="_"then1390
  181. 1810 my=val(my$)
  182. 1820 my=log(my)/log(10):sy=1:ny=0:ty=0:w=176/my
  183. 1830 e3=1
  184. 1840 print:print:print"  eingabe o.k. ?  (j/n)"
  185. 1850 geta$
  186. 1860 ifa$="n"then1270
  187. 1870 ifa$="j"then1900
  188. 1880 :
  189. 1890 goto1850
  190. 1900 gosub4100
  191. 1910 :
  192. 1920 fork=1toak:g=0:n=n1(k)
  193. 1930 :
  194. 1940 gosub2610
  195. 1950 :
  196. 1960 ife1=0then2060
  197. 1970 my=int((my+my/10)*100+.5)/100
  198. 1980 ny=int((ny-ny/10)*100+.5)/100
  199. 1990 w=int((176/(my-ny))*100+.5)/100:ty=ny
  200. 2000 sy=int((my-ny)*100+.5)/500
  201. 2010 mx=x(k,n):nx=x(k,1)
  202. 2020 v=int((296/(mx-nx))*100+.5)/100:tx=nx
  203. 2030 sx=int((mx-nx)*100+.5)/500
  204. 2040 e1=0
  205. 2050 :
  206. 2060 ifk>1then2340
  207. 2070 D0,14
  208. 2080 D0,0,320,0,1
  209. 2090 D320,0,320,200,1
  210. 2100 D320,200,0,200,1
  211. 2110 D0,200,0,0,1
  212. 2120 forj= 0to320stepsx*v
  213. 2130 forl=184to0step-4
  214. 2140 Dj,l,1
  215. 2150 nextl
  216. 2160 ifj=0then2200
  217. 2170 t$=str$(int(tx*100+.5)/100)
  218. 2180 ife2=1thent$=str$(int(10^tx*100+.5)/100 )
  219. 2190 DOj-16,188,t$,1,1,8
  220. 2200 tx=tx+sx
  221. 2210 nextj
  222. 2220 DOj-sx*v*1.8,176,t1$,1,1,8
  223. 2230 forj=200to0step-sy*w
  224. 2240 forl= 0to320step4
  225. 2250 Dl,j,1
  226. 2260 nextl
  227. 2270 ifj=200then2310
  228. 2280 t$=str$(int(ty*100+.5)/100)
  229. 2290 ife3=1thent$=str$(int(10^ty*100+.5)/100)
  230. 2300 DO0,j+2,t$,1,1,8
  231. 2310 ty=ty+sy
  232. 2320 nextj
  233. 2330 DO8,j+sy*w*1.5,t2$,1,1,8
  234. 2340 ife3=0then2390
  235. 2350 forj=1tog
  236. 2360 ift(j)<1thent(j)=1
  237. 2370 t(j)=log(t(j))/log(10)
  238. 2380 nextj
  239. 2390 ife2=0then2440
  240. 2400 forj=1tog
  241. 2410 ifz(j)<1thenz(j)=1
  242. 2420 z(j)=log(z(j))/log(10)
  243. 2430 nextj
  244. 2440 fori=1tog-1
  245. 2450 z1=(z(i)-nx)*v   :z2=(z(i+1)-nx)*v
  246. 2460 t1=200- (t(i)-ny)*w :t2=200-(t(i+1)-ny)*w
  247. 2470 ifz1<0orz2<0ort1<0ort2<0orz1>320orz2>320ort1>200ort2>200then2490
  248. 2480 Dz1,t1,z2,t2,1
  249. 2490 nexti
  250. 2500 ife5=2thene5=1:goto2570
  251. 2510 nextk
  252. 2520 ife5= 1then5120
  253. 2530 goto2570
  254. 2540 print"[147]":print:print:print:print:printspc(9)"drucker eingeschaltet ?"
  255. 2550 ifpeek(203)<>60then2550
  256. 2560 DP2:DW
  257. 2570 DP2
  258. 2580 ifpeek(203)<>60then2580
  259. 2590 DP0:goto260
  260. 2600 :
  261. 2610 rem berechnung der int.pol.stellen
  262. 2620 :
  263. 2630 gosub2830
  264. 2640 :
  265. 2650 fori=1ton-1
  266. 2660 x=x(k,i):y=y(k,i):gosub3280
  267. 2670 ife1=1thenny=y(k,1)
  268. 2680 forx=x(k,i)+sw(k,i)tox(k,i+1) stepsw(k,i)
  269. 2690 x=int(x*100+.5)/100
  270. 2700 ifx=x(k,i+1)then 2750
  271. 2710 y=a(i)+b(i)*(x-x(k,i))+c(i)*(x-x(k,i))^2+d(i)*(x-x(k,i))^3
  272. 2720 :
  273. 2730 gosub3280
  274. 2740 :
  275. 2750 nextx
  276. 2760 nexti
  277. 2770 x=x(k,n):y=y(k,n)
  278. 2780 :
  279. 2790 gosub3280
  280. 2800 :
  281. 2810 return
  282. 2820 :
  283. 2830 rem koeffizientenberechnung
  284. 2840 :
  285. 2850 fori=1ton
  286. 2860 a(i)=y(k,i):nexti
  287. 2870 c(1)=0:c(n)=0
  288. 2880 fori=1ton-1
  289. 2890 h(i)=x(k,i+1)-x(k,i)
  290. 2900 nexti
  291. 2910 :
  292. 2920 gosub3000
  293. 2930 :
  294. 2940 fori=1ton-1
  295. 2950 b(i)=(a(i+1)-a(i))/h(i)-h(i)*(c(i+1)+2*c(i))/3
  296. 2960 d(i)=(c(i+1)-c(i))/(3*h(i))
  297. 2970 nexti
  298. 2980 return
  299. 2990 :
  300. 3000 rem koeffizientenberechnung c
  301. 3010 rem matrix m
  302. 3020 :
  303. 3030 fori=2ton-1
  304. 3040 m(i,i)=2*(h(i)+h(i+1))
  305. 3050 m(i,i+1)=h(i)
  306. 3060 m(i+1,i)=h(i)
  307. 3070 nexti
  308. 3080 :
  309. 3090 rem vektor v
  310. 3100 :
  311. 3110 forj=2ton-1
  312. 3120 v(j)=3*(a(j+1)-a(j))/h(j)-3*(a(j)-a(j-1))/h(j-1)
  313. 3130 nextj
  314. 3140 :
  315. 3150 rem gauss
  316. 3160 :
  317. 3170 o(2)=m(2,2):p(2)=m(2,3)/o(2):q(2)=v(2)/o(2)
  318. 3180 fori=3ton
  319. 3190 o(i)=m(i,i)-m(i,i-1)*p(i-1)
  320. 3200 p(i)=m(i,i+1)/o(i)
  321. 3210 q(i)=(v(i)-m(i,i-1)*q(i-1))/o(i)
  322. 3220 nexti
  323. 3230 fori=nto2step-1
  324. 3240 c(i)=q(i)-p(i)*c(i+1)
  325. 3250 nexti
  326. 3260 return
  327. 3270 :
  328. 3280 rem ergebnisse speichern
  329. 3290 :
  330. 3300 g=g+1
  331. 3310 z(g)=int(x*10000+.5)/10000:t(g)=int(y*10000+.5)/10000
  332. 3320 ife1=0then3350
  333. 3330 ift(g)>mythenmy=t(g)
  334. 3340 ift(g)<nythenny=t(g)
  335. 3350 return
  336. 3360 :
  337. 3370 :
  338. 3380 rem tab DW
  339. 3390 :
  340. 3400 print"[147]":print:print:print:printspc(9)"drucker eingeschaltet ?"
  341. 3410 ifpeek(203)<>60then3410
  342. 3420 open4,4
  343. 3430 fork=1toak:n=n1(k):g=0:e6=2:gosub2610
  344. 3440 print#4,chr$(18)"  kurve "k"         x              y       "
  345. 3450 fori=1tog
  346. 3460 print#4,chr$(146)chr$(16)"18"z(i)  chr$(16)"33"t(i)
  347. 3470 nexti
  348. 3480 ife5<>0then3500
  349. 3490 nextk
  350. 3500 ife5=1then5120
  351. 3510 ife5=2thene5=1:e6=0
  352. 3520 close4:goto280
  353. 3530 :
  354. 3540 rem eingabe tape DR
  355. 3550 :
  356. 3560 d=1:goto3580
  357. 3570 d=8
  358. 3580 print"[147]"
  359. 3590 fori=1to6:print:nexti
  360. 3600 ifd=1thenprintspc(6)"recorder o.k. ?"
  361. 3610 ifd=8thenprintspc(6)"floppy o.k. ?"
  362. 3620 print:print:input"       filename";n$
  363. 3630 ifn$="_"then150
  364. 3640 print:print
  365. 3650 open1,d,0, n$:open2,8,15:input#2,f,b$
  366. 3660 iff=0then3700
  367. 3670 print"[147]  fehler: "b$:close2:close1:Dj"$
  368. 3680 [161]a$:[139]a$[179][177]""[167][153]"load":[137]3620
  369. 3690 [137]3680
  370. 3700 [132]1,ak,sw,di
  371. 3710 [132]1,t1$,mx,nx,v,tx,sx,e2
  372. 3720 [132]1,t2$,my,ny,w,ty,sy,e3
  373. 3730 [129]k[178]1[164]ak
  374. 3740 [132]1,n1(k)
  375. 3750 [139]n1(k)[177]n1[167]n1[178]n1(k)
  376. 3760 [130]k
  377. 3770 n1[178]n1[170]1
  378. 3780 [134]x(ak,n1),y(ak,n1),sw(k,n1)
  379. 3790 [134]a(n1),b(n1),c(n1),d(n1),m(n1,n1),v(n1),o(n1),p(n1),q(n1)
  380. 3800 [129]k[178]1[164]ak
  381. 3810 [129]i[178]1[164]n1(k)
  382. 3820 [132]1,x(k,i),y(k,i):[132]1,sw(k,i)
  383. 3830 [130]i
  384. 3840 [130]k
  385. 3850 [160]1:[160]2:[134]z(di[170]3),t(di[170]3):[137]260
  386. 3860 :
  387. 3870 [143] ausgabe tape DR
  388. 3880 :
  389. 3890 d[178]1:[137]3910
  390. 3900 d[178]8
  391. 3910 [153]"load"
  392. 3920 [129]i[178]1[164]6:[153]:[130]i
  393. 3930 [139]d[178]1[167][153][166]6)"recorder o.k. ?"
  394. 3940 [139]d[178]8[167][153][166]6)"floppy o.k. ?"
  395. 3950 [153]:[153]:[133]"       filename";n$
  396. 3960 [159]1,d,1,n$
  397. 3970 [152]1,ak:[152]1,sw:[152]1,di:[152]1,t1$
  398. 3980 [152]1,mx:[152]1,nx:[152]1,v:[152]1,nx:[152]1,sx:[152]1,e2
  399. 3990 [152]1,t2$:[152]1,my:[152]1,ny:[152]1,w:[152]1,ny
  400. 4000 [152]1,sy:[152]1,e3
  401. 4010 [129]k[178]1[164]ak:[152]1,n1(k):[130]k
  402. 4020 [129]k[178]1[164]ak
  403. 4030 [129]i[178]1[164]n1(k)
  404. 4040 [152]1,x(k,i):[152]1,y(k,i):[152]1,sw(k,i)
  405. 4050 [130]i:[130]k
  406. 4060 [160]1:[137]280
  407. 4070 :
  408. 4080 [143] DO
  409. 4090 :
  410. 4100 [153]"load           spline berechnung            wait"
  411. 4110 [129]i[178]1[164]10:[153]:[130]i
  412. 4120 [153][166]13)"bitte warten"
  413. 4130 [142]
  414. 4140 :
  415. 4150 :
  416. 4160 [143] bubblesort
  417. 4170 :
  418. 4180 [129]o[178]2[164]n1(i)
  419. 4190 [129]p[178]n1(i)[164]o[169][171]1
  420. 4200 [139]x(i,p[171]1)[177]x(i,p)[167]4220
  421. 4210 [137]4250
  422. 4220 h[178]x(i,p):q[178]y(i,p)
  423. 4230 x(i,p)[178]x(i,p[171]1):y(i,p)[178]y(i,p[171]1)
  424. 4240 x(i,p[171]1)[178]h:y(i,p[171]1)[178]q
  425. 4250 [130]p
  426. 4260 [130]o
  427. 4270 [142]
  428. 4280 :
  429. 4290 :
  430. 4300 [143] ausgabe datenfile
  431. 4310 :
  432. 4320 [153]:[153]:[153][166]14)"tape (1)"
  433. 4330 [153]:[153][166]14)"disk (2)"
  434. 4340 [161]a$:a[178][197](a$):[145]a[137] 4350,4360:[137]4340
  435. 4350 d[178]1:[137]4370
  436. 4360 d[178]8
  437. 4370 [153]"load"
  438. 4380 [129]j[178]1[164]6:[153]:[130]j
  439. 4390 [139]d[178]1[167][153][166]6)"recorder o.k. ?"
  440. 4400 [139]d[178]8[167][153][166]6)"floppy o.k. ?"
  441. 4410 [153]:[153]:[133]"       filename ";n$
  442. 4420 [159]1,d,1,n$
  443. 4430 [152]1,sw:[152]1,di:[152]1,n1(i)
  444. 4440 [129]k[178]1[164]n1(i)
  445. 4450 [152]1,x(i,k):[152]1,y(i,k):[152]1,sw(i,k)
  446. 4460 [130]k
  447. 4470 [159]2,8,15:[132]2,f,b$
  448. 4480 [139] f[178]0[167]4500
  449. 4490 [153]"load  fehler: "b$:[160]2:[160]1:[137]4410
  450. 4500 [160]2:[160]1:d[178]0:[137]890
  451. 4510 :
  452. 4520 :
  453. 4530 [143] eingabe datenfile
  454. 4540 :
  455. 4550 d[178]1:[137]4570
  456. 4560 d[178]8
  457. 4570 [153]"load"
  458. 4580 [129]j[178]1[164]6:[153]:[130]j
  459. 4590 [139]d[178]1[167][153][166]12)"recorder o.k. ?"
  460. 4600 [139]d[178]8[167][153][166]12)"floppy o.k. ?"
  461. 4610 [161]a$:[139]a$[178]""[167]4610
  462. 4620 [153]"load":[153]:[133]"       anzahl datenfiles";ak$
  463. 4630 [139]ak$[178]"_"[167]150
  464. 4640 ak[178][197](ak$)
  465. 4650 [134]n$(ak):[153]
  466. 4660 [129]j[178]1[164]ak
  467. 4670 [139]j[179][178]0[167][138]
  468. 4680 [153]:[153]"       filename";j:[133]"on";n$(j)
  469. 4690 [139]n$(j)[178]"_"[167]j[178]j[171]2:[130]j
  470. 4700 [130]j
  471. 4710 [129]j[178]1[164]ak
  472. 4720 [159]1,d,0,n$(j):[159]2,8,15:[132]2,f,b$
  473. 4730 [139]f[178]0[167]4770
  474. 4740 [153]"load  fehler: "b$:[160]2:[160]1:Dj"$
  475. 4750 geta$:ifa$<>""thenprint"[147]":goto4660
  476. 4760 goto4750
  477. 4770 input#1,sw,de,n1(j)
  478. 4780 ifn1(j)>n1thenn1=n1(j)
  479. 4790 close1:close2:nextj
  480. 4800 n1=n1+1
  481. 4810 dimx(ak,n1),y(ak,n1),sw(ak,n1)
  482. 4820 dima(n1),b(n1),c(n1),d(n1),h(n1),m(n1,n1),v(n1),o(n1),p(n1),q(n1)
  483. 4830 forj=1toak
  484. 4840 open1,d,0,n$(j)
  485. 4850 input#1,sw,de,n1(j)
  486. 4860 ifde>dithendi=de
  487. 4870 fork=1ton1(j)
  488. 4880 input#1,x(j,k),y(j,k),sw(j,k)
  489. 4890 nextk:close1
  490. 4900 nextj:ifzw>dithendi=zw
  491. 4910 dimz(di+3),t(di+3):d=0:goto260
  492. 4920 :
  493. 4930 rem vergleich fkt - spl
  494. 4940 :
  495. 4950 print"[147]":print:print:input"     funktion f(x)=";f$
  496. 4960 iff$="_"thenrun
  497. 4970 print"[147][155]5140 deffnf(x)="f$
  498. 4980 print"goto5000"
  499. 4990 poke631,19:poke632,13:poke633,13:poke198,3:end
  500. 5000 print"[147][144]             funktionsdaten             [146]"
  501. 5010 print:print:input"  anfangs x-wert";xa$
  502. 5020 ifxa$="_"then4950
  503. 5030 xa=val(xa$)
  504. 5040 print:print:input"  end x-wert";xe$
  505. 5050 ifxe$="_"then5010
  506. 5060 xe=val(xe$)
  507. 5070 print:print:input"  anzahl zwischenwerte";zw$
  508. 5080 ifzw$="_"then5040
  509. 5090 zw=val(zw$)
  510. 5100 sv=(xe-xa)/zw:e5=1
  511. 5110 goto130
  512. 5120 g=0:e5=2
  513. 5130 forx=xatoxe+.0001stepsv
  514. 5140 deffnf(x)=x+2
  515. 5150 y=fnf(x):gosub3300
  516. 5160 nextx
  517. 5170 ife6=1then1050
  518. 5180 ife6=2then3440
  519. 5190 goto2340
  520.